﻿/*功能描述：绩效设置
作者：李周蓬
时间：2021-12-13
修改人：李周蓬
修改时间：2021-12-13*/
using HongStone.Domain.PerformanceModel;
using HongStone.Dto;
using HongStone.Repository;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HongStone.Service
{
    public class PerformanceBll
    {
        private readonly PerformanceDal _performanceDal;
        public PerformanceBll(PerformanceDal performanceDal)
        {
            _performanceDal = performanceDal;
        }
        /// <summary>
        /// 显示考核任务
        /// </summary>
        /// <returns></returns>
        public ResultData ShowTheAssessmentTask()
        {
            return _performanceDal.ShowTheAssessmentTask();
        }
        /// <summary>
        /// 显示考核统计
        /// </summary>
        /// <returns></returns>
        public ResultData ShowAssessmentTotal()
        {
            return _performanceDal.ShowAssessmentTotal();
        }
        /// <summary>
        /// 添加考核任务
        /// </summary>
        /// <returns></returns>
        public ResultData AddTheAssessmentTask(TheAssessmentTask theAssessmentTask)
        {
            return _performanceDal.AddTheAssessmentTask(theAssessmentTask);
        }
        /// <summary>
        /// 修改考核任务
        /// </summary>
        /// <param name="theAssessmentTask"></param>
        /// <returns></returns>
        public ResultData UpdateTheAssessmentTask(TheAssessmentTask theAssessmentTask)
        {
            return _performanceDal.UpdateTheAssessmentTask(theAssessmentTask);
        }
        /// <summary>
        /// 删除考核任务
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public ResultData DelTheAssessmentTask(string id)
        {
            return _performanceDal.DelTheAssessmentTask(id);
        }
        /// <summary>
        /// 归档
        /// </summary>
        /// <returns></returns>
        public ResultData UpdateGuiDang(string id)
        {
            return _performanceDal.UpdateGuiDang(id);
        }
        /// <summary>
        /// 显示部门内考核
        /// </summary>
        /// <param name="itemNumber"></param>
        /// <returns></returns>
        public ResultData ShowDeptAssessment(string itemNumber)
        {
            return _performanceDal.ShowDeptAssessment(itemNumber);
        }
        /// <summary>
        /// 提交考核
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public ResultData UpdateKaoHe(string id)
        {
            return _performanceDal.UpdateKaoHe(id);
        }
        /// <summary>
        /// 显示考核项目
        /// </summary>
        /// <param name="name"></param>
        /// <param name="year"></param>
        /// <param name="deptid"></param>
        /// <param name="itemNumber"></param>
        /// <returns></returns>
        public ResultData ShowProjectAssessment(string name, int year, int deptid, string itemNumber)
        {
            return _performanceDal.ShowProjectAssessment(name, year, deptid, itemNumber);
        }
        /// <summary>
        /// 绑定部门
        /// </summary>
        /// <returns></returns>
        public ResultData BindDept()
        {
            return _performanceDal.BindDept();
        }
        /// <summary>
        /// 添加考核项目
        /// </summary>
        /// <returns></returns>
        public ResultData AddProjectAssessment(ProjectAssessment projectAssessment)
        {
            return _performanceDal.AddProjectAssessment(projectAssessment);
        }
        /// <summary>
        /// 修改考核项目
        /// </summary>
        /// <param name="projectAssessment"></param>
        /// <returns></returns>
        public ResultData UpdateProjectAssessment(ProjectAssessment projectAssessment)
        {
            return _performanceDal.UpdateProjectAssessment(projectAssessment);
        }
        /// <summary>
        /// 删除考核项目
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public ResultData DelProjectAssessment(string id)
        {
            return _performanceDal.DelProjectAssessment(id);
        }
        /// <summary>
        /// 绑定建筑类型
        /// </summary>
        /// <returns></returns>
        public ResultData BindBudingType()
        {
            return _performanceDal.BindBudingType();
        }
        /// <summary>
        /// 修改考核名称
        /// </summary>
        /// <param name="projectAssessment"></param>
        /// <returns></returns>
        public ResultData UpdateAssessmentName(ProjectAssessment projectAssessment)
        {
            return _performanceDal.UpdateAssessmentName(projectAssessment);
        }
        /// <summary>
        /// 修改考核分类
        /// </summary>
        /// <param name="projectAssessment"></param>
        /// <returns></returns>
        public ResultData UpdateAssessmentNames(ProjectAssessment projectAssessment)
        {
            return _performanceDal.UpdateAssessmentNames(projectAssessment);
        }
        /// <summary>
        /// 删除考核分类
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        public ResultData DelAssessmentNames(string name)
        {
            return _performanceDal.DelAssessmentName(name);
        }
        /// <summary>
        /// 删除考核名称
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        public ResultData DelAssessmentName(string name)
        {
            return _performanceDal.DelAssessmentName(name);
        }
        /// <summary>
        /// 显示分页
        /// </summary>
        /// <param name="year"></param>
        /// <param name="deptid"></param>
        /// <param name="itemNumber"></param>
        /// <param name="totalcount"></param>
        /// <param name="pageindex"></param>
        /// <param name="pagesize"></param>
        /// <returns></returns>
        public ResultData ShowKao(int year, int deptid, string itemNumber, out int totalcount, int pageindex = 1, int pagesize = 3)
        {
            return _performanceDal.ShowKao(year, deptid, itemNumber, out totalcount, pageindex, pagesize);
        }
        /// <summary>
        /// 显示项目进度
        /// </summary>
        /// <returns></returns>
        public ResultData ShowAssessSchedule(string itemNumber, out int totalcount)
        {
            return _performanceDal.ShowAssessSchedule(itemNumber,out totalcount);
        }
        /// <summary>
        /// 发起审批
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        public ResultData UpdateShenPi(string ids)
        {
            return _performanceDal.UpdateShenPi(ids);
        }
        /// <summary>
        /// 重新提交考核
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public ResultData UpdateChongKaoHe(string id)
        {
            return _performanceDal.UpdateChongKaoHe(id);
        }
        /// <summary>
        /// 调整数量
        /// </summary>
        /// <returns></returns>
        public ResultData ShowTiao()
        {
            return _performanceDal.ShowTiao();
        }
        /// <summary>
        /// 显示部门内奖金计算
        /// </summary>
        /// <param name="itemnumber"></param>
        /// <returns></returns>
        public ResultData ShowJi(string itemnumber)
        {
            return _performanceDal.ShowJi(itemnumber);
        }
        /// <summary>
        /// 显示项目奖金调整
        /// </summary>
        /// <param name="itemnumber"></param>
        /// <param name="deptid"></param>
        /// <returns></returns>
        public ResultData ShowTiaokk(string itemnumber, int deptid)
        {
            return _performanceDal.ShowTiaokk(itemnumber, deptid);
        }
        /// <summary>
        /// 部门内奖金计算
        /// </summary>
        /// <param name="deptid"></param>
        /// <returns></returns>
        public ResultData ShowSalaryCount(string itemnumber)
        {
            return _performanceDal.ShowSalaryCount(itemnumber);
        }
        /// <summary>
        ///部门内奖金计算1
        /// </summary>
        /// <param name="deptid"></param>
        /// <returns></returns>
        public ResultData ShowStaffSalaryCount(int deptid)
        {
            return _performanceDal.ShowStaffSalaryCount(deptid);
        }
        /// <summary>
        /// 分配详情
        /// </summary>
        /// <param name="itemnumber"></param>
        /// <param name="deptid"></param>
        /// <returns></returns>
        public ResultData ShowTiaoXiang(string itemnumber, int deptid)
        {
            return _performanceDal.ShowTiaoXiang(itemnumber, deptid);
        }
        /// <summary>
        /// 年度总奖金分配显示
        /// </summary>
        /// <param name="deptid"></param>
        /// <param name="state"></param>
        /// <returns></returns>
        public ResultData ShowYearBonus(int deptid, int state)
        {
            return _performanceDal.ShowYearBonus(deptid, state);
        }
        /// <summary>
        /// 查看考核名称
        /// </summary>
        /// <param name="staffid"></param>
        /// <returns></returns>
        public ResultData ShowChaSalaryUpdate(int staffid)
        {
            return _performanceDal.ShowChaSalaryUpdate(staffid);
        }
    }
}
